package cn.madis.ymcc;


import cn.madis.ymcc.fallback.CourseFeignClientFallbackFactory;
import cn.madis.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


@FeignClient(value = "service-course",fallbackFactory = CourseFeignClientFallbackFactory.class)
public interface CourseFeignClient {
    /**
     * 根据课程id和登录人id查看视频购买记录
     */
    @RequestMapping(value = "/courseUserLearn/{loginId}/{courseId}",method = RequestMethod.GET)
    JSONResult checkUserLearn(@PathVariable("loginId")Long loginId, @PathVariable("courseId") Long courseId);

    /**
     * 订单数据查询展示
     */
    @RequestMapping(value = "/course/info/{courseId}",method = RequestMethod.GET)
    JSONResult info(@PathVariable("courseId") String courseId);
}
